package com.atXiao.food.chain;


import org.springframework.util.StringUtils;

/**
 * @author: lixiaoxiao
 * @date: 2024/1/12 11:44
 * @version: 1.0
 * @desc:
 */
public class ValidHandler extends Handler{
    @Override
    public void doHandler(User user) {
        String userName = user.getUserName();
        String password = user.getPassword();
        if (StringUtils.isEmpty(userName)||StringUtils.isEmpty(password)){
            System.out.println("用户名或者密码为空，校验不通过~~~~~~~~~~~~~~");
            return;
        }
        System.out.println("校验通过~~~~~~~~~~~~~~");
        nextHandler.doHandler(user);

    }
}
